<!DOCTYPE html>
<html lang="en">
<head>
        <title></title><meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" href="__CONTENT__/admin/css/bootstrap.min.css" />
		<link rel="stylesheet" href="__CONTENT__/admin/css/bootstrap-responsive.min.css" />
        <link rel="stylesheet" href="__CONTENT__/admin/css/matrix-login.css" />
        <link href="__CONTENT__/admin/font-awesome/css/font-awesome.css" rel="stylesheet" />
		<link href='http://fonts.useso.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
    </head>
    <body>
        <div id="loginbox">            
            <form id="loginform" method="post" class="form-vertical" action="{:U('login')}">
				 <div class="control-group normal_text"> <h3>
				 Staff management
<!-- 				 <img src="__CONTENT__/admin/img/logo.png" alt="Logo" /> -->
				 </h3></div>
                <div class="control-group">
                    <div class="controls">
                        <div class="main_input_box">
                            <span class="add-on bg_lg"><i class="icon-user"></i></span><input type="text" name="username" placeholder="name" />
                        </div>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <div class="main_input_box">
                            <span class="add-on bg_ly"><i class="icon-lock"></i></span><input type="password" name="password" placeholder="password" />
                        </div>
                    </div>
                </div>
                <div class="controls">
                        <div class="main_input_box" id="error-message" style="float:right;color:red;">
                        </div>
                    </div>
                <div class="form-actions">
                	<!-- 
                    <span class="pull-left"><a href="#" class="flip-link btn btn-info" id="to-recover">Lost password?</a></span>
                     -->
                    <span class="pull-right">
                    <input type="submit" class="btn btn-success" id="login" value="login" /> 
                    </span>
                </div>
            </form>
            <form id="recoverform" action="#" class="form-vertical">
				<p class="normal_text">Enter your e-mail address below and we will send you instructions how to recover a password.</p>
				
                    <div class="controls">
                        <div class="main_input_box">
                            <span class="add-on bg_lo"><i class="icon-envelope"></i></span><input type="text" placeholder="E-mail address" />
                        </div>
                    </div>
               
                <div class="form-actions">
                    <span class="pull-left"><a href="#" class="flip-link btn btn-success" id="to-login">&laquo; Back to login</a></span>
                    <span class="pull-right"><a class="btn btn-info"/>Reecover</a></span>
                </div>
            </form>
        </div>
        <script src="__CONTENT__/admin/js/jquery.min.js"></script>  
        <script src="__CONTENT__/admin/js/matrix.login.js"></script> 
        <script>
        $(function(){
        	$("input[name='username'],input[name='password']").keydown(function(){
        		$("#error-message").empty();
        	});
        	$("#login").click(function(){
        		var data={};
        		data.username=$.trim($("input[name='username']").val());
        		data.password=$("input[name='password']").val();
        		$.post("{:U('login')}",data,function(rs){
        			if(rs=='true'){
        				location.href="{:U('Index/index')}";
        			}else{
        				$("#error-message").html(rs);
        			}
        		});
        		return false;
        	});
        });
        </script>
    </body>
</html>